package br.com.rafaelSys.list;

import java.util.Arrays;

import javax.persistence.EntityManager;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.framework.EntityQuery;

import br.com.rafaelSys.entidades.Carteira;

@Name("carteiraList")
@Scope(ScopeType.EVENT)
public class CarteiraList extends EntityQuery<Carteira> {
	
	@In
	private EntityManager entityManager;
			
	private static final long serialVersionUID = -8317902333292458406L;

	private static final String EJBQL = "select c from Carteira c";

	private static final String[] RESTRICTIONS = {};

	private Carteira carteira = new Carteira();

	public CarteiraList() {
		setEntityManager(entityManager);
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}
	
	public Carteira getCarteira() {
		return carteira;
	}
	
	@Override
	public EntityManager getEntityManager() {
		return entityManager;
	}

	@Override
	public void setEntityManager(EntityManager entityManager) {
		this.entityManager = entityManager;
	}

}
